﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LeanEngine.Data.Linq.Language
{
    public sealed class ContainsToken : CompareToken
    {
        public override string GetStatement()
        {
            this.CompareValue = this.CompareValue.Insert(1, "%");
            this.CompareValue = this.CompareValue.Insert(this.CompareValue.Length - 1, "%");
            return base.Field.GetStatement() + " LIKE " + this.CompareValue + " " + this.CombineOperator;
        }
    }
}
